package com.cari.oa.domain;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 系统角色模块关系实体类
 * User: yexuhui
 * Date: 12-12-12
 * Time: 下午9:40
 */
@Entity
@Table(name = "T_SYS_ROLE_ACTION_REL")
public class SysRoleActionRelEntity implements Serializable {

    private static final long serialVersionUID = -2142812180441776207L;

    @Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;

    @NotNull(message = "角色名不能为空")
    @Length(max = 32, message = "角色名长度要小于32个字符")
    @Column(name = "role_name")
    private String roleName;

    @NotNull(message = "模块名不能为空")
    @Length(max = 32, message = "模块名长度要小于32个字符")
    @Column(name = "action_name")
    private String actionName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}
}
